﻿using System.Collections;
using System.Collections.Generic;
using Gameplay.PVE.Utils;
using UnityEngine;
using Yoozoo.Gta.Common;

public class UnitRootMotion : MonoBehaviour
{
    public int unitId;
    public Animator animator;
    void OnAnimatorMove()
    {
        if (animator == null)
        {
            animator = GetComponentInChildren<Animator>();
        }

        if (animator != null)
        {
            ResidentHandler.Inst.GetFunction("L_RpgManager.SetRootMotionMovement").Action(unitId,animator.deltaPosition,animator.deltaRotation);
        }
    }
   
}
